package com.sinochem.yunlian.ship.common.enums;

import lombok.Getter;

/**
 * 数据来源：uc_ship,uc_company,uc_company_ac_flow,uc_user,trd_bid ,trd_material
 **/
public enum DataSource {
    BACK(0 , "运营后台"),
    WEB(1 , "WEB"),
    APP(2 , "APP"),
    USER_CENTER(3 , "用户中心"),
    ONE_CHEMIC(4, "壹化网");

    @Getter
    private int code;
    @Getter
    private String name;

     DataSource(int code, String name){
         this.code = code;
         this.name = name;
    }
    public static String getDataSourceName(Integer code) {
        for (DataSource dataSource : values()) {
            if (dataSource.getCode()==code) {
                return dataSource.getName();
            }
        }
        return null;
    }

}
